#include <iostream>
#include <fstream>
#include <ctime>

using namespace std;

int main1() {
  int digitals1[5000];
int start_time = clock();
  ofstream Документы("m1_sorted(2).txt");

  for (int i = 0; i < 10; i++)
  {
    cin >> digitals[i];
  }

  for (int i = 0; i < 10; i++)
  {
    for (int j = 0; j < 9; j++)
    {
      if (digitals[j] > digitals[j + 1])
      {
        int b = digitals[j];
        digitals[j] = digitals[j + 1];
        digitals[j + 1] = b;
      }
    }
  }
  for (int i = 0; i < 10; i++)
  {
    cout << digitals[i] << " ";
  }

  int start_time = clock();
  unsigned int end_time = clock();
  unsigned int search_time = end_time - start_time;

  cout << search_time << endl;

  cout << m1_sorted(2).txt",start_time2,"milliseconds
  return 0;
}
int main2(){
  int digitals1[5000];
 int start_time2 = clock();
  ofstream Документы("m2_reverse");

  for (int i = 0; i < 10; i++)
  {
    for (int j = 0; j < 9; j++)
    {
      if (digitals[j] > digitals[j + 1])
      {
        int b = digitals[j];
        digitals[j] = digitals[j + 1];
        digitals[j + 1] = b;
      }
    }
  }


  unsigned int end_time = clock();
  unsigned int search_time = end_time - start_time;

  cout << search_time << endl;
  print("m2_reverse",start_time2,"milisecuns")
}
